﻿<Window x:Class="ApplicationUI.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:AvalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
    xmlns:HierarchicalData="clr-namespace:WtfManager.HierarchicalData;assembly=WtfManager.HierarchicalDataManager"
    xmlns:Controls="clr-namespace:WtfManager.Controls;assembly=WtfManager.Controls"
    xmlns:Theming="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.BureauBlack"
    xmlns:ApplicationUI="clr-namespace:ApplicationUI"
    xmlns:UIManager="clr-namespace:WtfManager.UIManager;assembly=WtfManager.UIManager"
    xmlns:Commands="clr-namespace:WtfManager.UIManager.Commands;assembly=WtfManager.UIManager"
    Height="600" Width="800"
    Title="{Binding ElementName=_dockingManager, Path=ActiveDocument.Data.Name}"
    Icon="{Binding ElementName=_dockingManager, Path=ActiveDocument.Data, 
          Converter={x:Static HierarchicalData:TreeItemToImageConverter.Instance}, ConverterParameter=true}" x:Name="_mainWindow"
    UIManager:StateManager.DefaultStateFileName="DefaultState.xml">
  
  <DockPanel LastChildFill="True">
    <!--<Theming:BureauBlackTheme DockPanel.Dock="Top">-->
    <Menu x:Name="mainMenu" Grid.Row="0" DockPanel.Dock="Top"
        UIManager:MenuManager.ProvideMenuItems="True"
        UIManager:MenuManager.SettingsFileName="MainMenu.xml">
    </Menu>
    <!--</Theming:BureauBlackTheme>-->

    <ContentControl x:Name="TestContainer">

      <Controls:WtfDockingManager x:Name="_dockingManager"
          UIManager:StateManager.PersistState="True" Grid.Row="1">

        <AvalonDock:ResizingPanel Orientation="Vertical">
          <AvalonDock:ResizingPanel Orientation="Horizontal">

            <AvalonDock:DocumentPane x:Name="_documentsHost">
            </AvalonDock:DocumentPane>

          </AvalonDock:ResizingPanel>
        </AvalonDock:ResizingPanel>
      </Controls:WtfDockingManager>

    </ContentControl>

  </DockPanel>
  <Window.CommandBindings>
    <Commands:WtfCommandBinding Command="Commands:ViewCommands.ShowPanel" />
    <Commands:WtfCommandBinding Command="UIManager:StateManager.SaveStateCommand" />
    <Commands:WtfCommandBinding Command="UIManager:StateManager.RestoreStateCommand" />
    <Commands:WtfCommandBinding Command="ApplicationCommands.Undo" />
    <Commands:WtfCommandBinding Command="ApplicationCommands.Redo" />
  </Window.CommandBindings>
  <Window.InputBindings>
    <KeyBinding Command="Commands:ViewCommands.ShowPanel"
        CommandParameter="{x:Type ApplicationUI:ExplorerTree}" Key="E" Modifiers="Control" />
  </Window.InputBindings>
</Window>
